#include "stdafx.h"
#include "painter.h"

namespace gdipp
{

painter::~painter()
{
}

bool painter::begin(const dc_context *context)
{
	_context = context;

	_text_alignment = GetTextAlign(_context->hdc);
	assert(_text_alignment != GDI_ERROR);

	_text_color = parse_palette_color(_context->hdc, GetTextColor(_context->hdc));
	if (_text_color == CLR_INVALID)
		_text_color = 0;

	// transparent DC may not have background color
	_bg_color = parse_palette_color(_context->hdc, GetBkColor(_context->hdc));

	return true;
}

void painter::end()
{
}

}
